package com.laisheng.interview.controller;

import com.laisheng.interview.model.AccountingInfo;
import com.laisheng.interview.service.impl.ExerciseServiceImpl;
import com.laisheng.interview.service.impl.AccountingServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class ExerciseController {
    @Autowired
    private final ExerciseServiceImpl exerciseServiceImpl;
   @Autowired
   private AccountingServiceImpl accountingServiceImpl;
    public ExerciseController(ExerciseServiceImpl exerciseServiceImpl) {
        this.exerciseServiceImpl = exerciseServiceImpl;
    }
    @GetMapping("/accounting/data/{id}")
    public AccountingInfo getAccountingDataById(@PathVariable Long id) {
        return accountingServiceImpl.getAccountingInfoById(id);
    }

}